﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site4.Master" AutoEventWireup="true" CodeBehind="小区管理员.aspx.cs" Inherits="小区物业管理系统.小区管理员" %>
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" runat="server">
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="编号" BackColor="White" BorderColor="#DEDFDE" BorderStyle="None" BorderWidth="1px" CellPadding="4"  ForeColor="Black" GridLines="Vertical" Height="312px" OnRowDeleting="GridView1_RowDeleting" Width="562px" >
        <AlternatingRowStyle BackColor="White" />
        <Columns>
            <asp:BoundField DataField="编号" HeaderText="编号" ReadOnly="True" SortExpression="编号" />
            <asp:BoundField DataField="姓名" HeaderText="姓名" SortExpression="姓名" />
            <asp:BoundField DataField="职务" HeaderText="职务" SortExpression="职务" />
            <asp:BoundField DataField="联系电话" HeaderText="联系电话" SortExpression="联系电话" />
            <asp:BoundField DataField="密码" HeaderText="密码" SortExpression="密码" />
        </Columns>
        <FooterStyle BackColor="#CCCC99" />
        <HeaderStyle BackColor="#6B696B" Font-Bold="True" ForeColor="White" />
        <PagerStyle BackColor="#F7F7DE" ForeColor="Black" HorizontalAlign="Right" />
        <RowStyle BackColor="#F7F7DE" />
        <SelectedRowStyle BackColor="#CE5D5A" Font-Bold="True" ForeColor="White" />
        <SortedAscendingCellStyle BackColor="#FBFBF2" />
        <SortedAscendingHeaderStyle BackColor="#848384" />
        <SortedDescendingCellStyle BackColor="#EAEAD3" />
        <SortedDescendingHeaderStyle BackColor="#575357" />
    </asp:GridView>
    <asp:LinqDataSource ID="LinqDataSource1" runat="server" ContextTypeName="小区物业管理系统.小区物业管理系统DataContext" EntityTypeName="" TableName="管理员">
    </asp:LinqDataSource>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server">
    <asp:Label ID="Label1" runat="server" Text="编号："></asp:Label>
    <asp:TextBox ID="TextBox1" runat="server"></asp:TextBox>
    <br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ControlToValidate="TextBox1" ErrorMessage="管理员编号不能为空！" ForeColor="#FF3300"></asp:RequiredFieldValidator>
    <br />
    <asp:Label ID="Label2" runat="server" Text="姓名："></asp:Label>
    <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox>
    <br />
    <asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox2" ErrorMessage="请输入2-4个汉字！" ForeColor="Red" ValidationExpression="[\u4E00-\u9FA5]{2,4}"></asp:RegularExpressionValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator3" runat="server" ControlToValidate="TextBox2" ErrorMessage="不能为空！" ForeColor="Red"></asp:RequiredFieldValidator>
    <br />
    <asp:Label ID="Label3" runat="server" Text="职务："></asp:Label>
    <asp:TextBox ID="TextBox3" runat="server"></asp:TextBox>
    <br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator2" runat="server" ControlToValidate="TextBox3" ErrorMessage="职务不能为空！" ForeColor="Red"></asp:RequiredFieldValidator>
    <br />
    <asp:Label ID="Label4" runat="server" Text="联系电话："></asp:Label>
    <asp:TextBox ID="TextBox4" runat="server"></asp:TextBox>
    <br />
    <asp:RegularExpressionValidator ID="RegularExpressionValidator2" runat="server" ControlToValidate="TextBox4" ErrorMessage="手机号码格式不对！" ForeColor="Red" ValidationExpression="(\(\d{3}\)|\d{3}-)?\d{8}"></asp:RegularExpressionValidator>
    <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="TextBox4" ErrorMessage="不能为空！" ForeColor="Red"></asp:RequiredFieldValidator>
    <br />
    <asp:Label ID="Label5" runat="server" Text="密码："></asp:Label>
    <asp:TextBox ID="TextBox5" runat="server" TextMode="Password"></asp:TextBox>
    <br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator5" runat="server" ControlToValidate="TextBox5" ErrorMessage="不能为空！" ForeColor="Red"></asp:RequiredFieldValidator>
    <br />
    <asp:Label ID="Label6" runat="server" Text="确认密码："></asp:Label>
    <asp:TextBox ID="TextBox6" runat="server" TextMode="Password"></asp:TextBox>
    <br />
    <asp:CompareValidator ID="CompareValidator1" runat="server" ControlToCompare="TextBox5" ControlToValidate="TextBox6" ErrorMessage="两次密码输入不一致！" ForeColor="Red"></asp:CompareValidator>
    <br />
    <asp:Button ID="Button1" runat="server" Text="插入" Height="40px" OnClick="Button1_Click" style="margin-left: 0px" Width="100px" />&nbsp&nbsp
    <asp:Button ID="Button2" runat="server" Text="修改" Height="40px" Width="100px" OnClick="Button2_Click" />&nbsp<asp:Button ID="Button3" runat="server" Text="删除" Height="40px" Width="92px" OnClick="Button3_Click" />
    &nbsp
    <br />
</asp:Content>
